// 定义一个自执行函数，将代码输入函数体中，
(function () {
    // function EventTarget(){  改写代码格式，将函数改为全局作用域
    EventTarget = function(){

    };

    // function WindowProperties(){    改写代码格式，将函数改为全局作用域
    let WindowProperties = function(){

    };
    WindowProperties.prototype.__proto__ = EventTarget.prototype

    // function Window(){    改写代码格式，将函数改为全局作用域
    Window = function(){

    };
    Window.prototype.PERSISTENT = 1;
    Window.prototype.TEMPORARY = 0;
    Window.prototype.__proto__ = WindowProperties.prototype;

})()


window = new Window;
console.log(window.__proto__ === Window.prototype);
// console.log(window.__proto__.__proto__ === WindowProperties.prototype);
console.log(window.__proto__.__proto__.__proto__ === EventTarget.prototype);
console.log(window.__proto__.__proto__.__proto__.__proto__ === Object.prototype);

